import java.util.Scanner;

public class Day33 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            char[] s1 = scanner.next().toCharArray();
            char[] s2 = scanner.next().toCharArray();

            // 思路：字符串匹配
            // 1. 如果第一个字符相同，继续向后匹配
            // 2. 如果匹配成功，count ++,然后继续从匹配成功的字符串末尾继续向下遍历，直到字符串s1遍历结束
            int count = 0;
            int i = 0;
            while (i < s1.length) {
                if (s1[i] == s2[0]) {
                    int j = 0;
                    // 记录一下当前下标，便于匹配不成功回溯 i 值
                    int coypI = i;
                    while (i < s1.length && j < s2.length && s1[i] == s2[j]) {
                        i ++;
                        j ++;
                    }
                    if (j == s2.length) {
                        // 说明子串匹配成功
                        count ++;
                        // 因为下面已经有了 i ++，所以这里直接跳过
                        continue;
                    } else {
                        // 说明没匹配成功
                        i = coypI;
                    }
                }
                i ++;
            }
            System.out.println(count);
        }
    }
}
